<template>
	<view>
		<view class="cont">
			<u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png" v-if="list.length ===0"></u-empty>
			<view class="" v-else>
				<view class="box" v-for="item in list" @tap="goinformations(item.id)">
					<view class="box-one">
						<view class="box-title">
							{{item.name}}
						</view>
						<view class="box-icon">
							<u-icon name="arrow-right"></u-icon>
						</view>
					</view>
					<view class="box-two">
						<view class="box-two-left">
							<img src="../../../static/image/Frame 880.png" alt="">申请人：{{item.sqr}}

						</view>
						<view class="box-two-right">
							<img src="../../../static/image/Frame 880.png" alt="">
							结束时间{{item.updateTime.toString().substring(0,4)}}.{{item.updateTime.toString().substring(4,6)}}.{{item.updateTime.toString().substring(6,8)}}
							{{item.updateTime.toString().substring(8,10)}}:{{item.updateTime.toString().substring(10,12)}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		acceptWorkAPI
	} from '../../../api/public.js'
	export default {
		data() {
			return {
				num: 1,
				list: []
			};
		},
		mounted() {
			this.getList()
		},
		methods: {
			getList() {
				acceptWorkAPI(6).then((r) => {
					this.list = r.data
				})
			},
			goinformations(id) {
				uni.navigateTo({
					url: `../informations/informations?id=${id}`
				})
			}
		}
	}
</script>

<style lang="scss">
	.avtive {
		background: #1989FA !important;
	}

	.color {
		color: #1989FA !important;
	}

	.tabs {
		display: flex;
		justify-content: space-around;

		.tabs-one {
			width: 311rpx;
			height: 82rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			.tabs-top {
				width: 112rpx;
				height: 44rpx;
				font-size: 28rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #999;
				line-height: 44rpx;

			}

			.tabs-color {
				width: 64rpx;
				height: 6rpx;
				margin-top: 15rpx;
				background: #fff;
			}
		}
	}

	.cont {
		height: calc(100vh - 120rpx);
		padding: 40rpx 24rpx 0 24rpx;
		background-color: #f6f6f6;

		.box {
			padding: 32rpx 48rpx;
			background-color: #fff;
			border-radius: 16px 16px 16px 16px;
			margin-bottom: 20rpx;

			.box-one {
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding-bottom: 20rpx;
				margin-bottom: 20rpx;
				border-bottom: 1px solid #EEEEEE;

				.box-title {
					font-size: 32rpx;
					font-family: PingFang SC-Medium, PingFang SC;
					font-weight: 500;
					color: #333333;
				}

				.box-icon {}
			}

			.box-two {
				display: flex;
				justify-content: space-between;
				align-items: center;
				padding: 20rpx;
				border-radius: 8px 8px 8px 8px;
				background: #F6F6F6;

				.box-two-left {
					display: flex;
					align-items: center;

					img {
						width: 28rpx;
						height: 28rpx;
					}

					font-size: 24rpx;
					font-family: PingFang SC-Medium,
					PingFang SC;
					font-weight: 500;
					color: #999999;
				}

				.box-two-right {

					display: flex;
					align-items: center;

					img {
						width: 28rpx;
						height: 28rpx;
					}

					font-size: 24rpx;
					font-family: PingFang SC-Medium,
					PingFang SC;
					font-weight: 500;
					color: #999999;
				}
			}
		}
	}
</style>
